<template>
  <div>
    <div class="header">
      <mainheader @onDataChange="changData"></mainheader>
    </div>
    <!-- <sidebar></sidebar> -->
    <div class="con">
      <router-view/>
    </div>
  </div>
</template>

<script>
import { mainheader, sidebar } from '@/components'
export default {
  name: 'layout',
  components: {
    mainheader,
    // sidebar
  },
  data() {
    return {

    }
  },
  props: {},
  computed: {},
  watch: {},
  created() {
    this.$router.push({ name: 'staffList' })
  },
  mounted() { },
  updated() { },
  destroyed() { },
  methods: {
    //一级导航回调
    changData(routerName) {
      this.$router.push({ name: routerName })
    }

  }
}

</script>

<style lang='less' scoped>
.con {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
}
</style>
